00、0c<template>
  <div>
    <!-- 搜索框 -->
    <van-search
      v-model="value"
      background="#4fc08d"
      show-action
      placeholder="请输入搜索关键词"
      @search="onSearch"
    >
      <template #action>
        <div @click="onSearch">搜索</div>
      </template>
    </van-search>
    <!-- 下方点击返回 -->
    <div class="back" @click="goback">
      <van-icon name="smile-o" />点击下方任意位置取消搜索
    </div>
    <!-- 搜索结果 -->
  </div>
</template>
<script>
// 引用indexgoodApi接口
import goodApi from "@/api/goodApi";
// 引入seachlist
export default {
  data() {
    return {
      value: "",
      list: []
    };
  },

  components: {},

  methods: {
    goback() {
      this.$router.push("/home");
    },
    onSearch() {
      if(this.value){
        console.log(111);
        this.$router.push("/list/goodlist?"+this.value)
      }else{
        this.$toast("请输入要查询的内容")
      }
    }
  }
};
</script>

<style scoped>
.van-search__content {
  border-radius: 0.14rem;
}
.back {
  height: 5rem;
  line-height: 5rem;
  font-size: 14px;
}
</style>
=>
getList-00/0Z0\Z